<?php 
require_once ('../connect.php');
$mysql = connect();
$query = "SELECT `GID` FROM `Users` WHERE `ID` = $_POST[ID] LIMIT 1";
// Если запрос успешен -- возвращаем 1
$result = $mysql->query($query);
$row = $result->fetch_array(MYSQLI_ASSOC);
echo $row["GID"];
?>
